<include file="Common/header" />

<body>
	<div class="panel admin-panel">
		<div class="panel-head"><strong>添加文章</strong>
		</div>
		<form action="{:U('Lmkj/Content/addAritcle')}" method="post">
			<div class="panel-body">
				<div class="line">
					<div class="x9" style="float: left;">
						<table class="table">
							<tr>
								<td width="100" class="text-right" style="display: block;">文章标题 *：</td>
								<td>
									<div class="field">
										<input type="text" class="input" name="title" size="50" placeholder="请输入标题" data-validate="required:请输入标题，建议在100字以内。" />
									</div>
								</td>
								<td width="100" class="text-right"> 标题颜色：</td>
								<td>
									<input type="text" class="input color" name="color" data-control="hue" value="#ff6161">
								</td>
								<td>
									<label>
										<input type="checkbox" value="1" name="new_window"> 新窗口打开 </label>
								</td>
							</tr>
							<tr>
								<td class="text-right">网站栏目 *：</td>
								<td colspan="5">
									<select class="input" style="width: 220px;" name="cid">
										<foreach name="data" item="vo" key="k" >
										<option value="{$vo.category_id}">{$vo._name}</option>
										</foreach>
									</select>
								</td>
							</tr>
							<tr>
								<td class="text-right">属性：</td>
								<td colspan="5">
									<foreach name="attr" item="vo" key="k" >
									<label>
										<input type="checkbox" value="{$vo.attr_id}" name="attr[]"> {$vo.attr_name}
									</label>
									</foreach>
								</td>
							</tr>
							<tr>
								<td class="text-right">SEO标题：</td>
								<td colspan="5">
									<input type="text" class="input" name="seo_title" value="" style="width: 300px;" placeholder="请输入SEO标题" />
								</td>
							</tr>
							<tr>
								<td class="text-right">文章内容：</td>
								<td colspan="5">
									<textarea id="editor" style="width:1000px;height:280px;" name="content"></textarea>
									<p class="margin-top">
										<!--<label class="margin-right">
											<input type="checkbox" value="1" name="down_remote_pic"> 获取远程文件 </label>-->
										<label class="margin-right">
											<input type="checkbox" checked="" value="1" name="auto_desc"> 截取内容 </label>
											<input type="text" name="auto_desc_length" value="200" style="width: 200px;display: inline-block;" class="input"> 字符至内容摘要
										<label class="margin-left">
											<input type="checkbox" value="1" name="auto_thumb"> 获取内容第
											<input class="input" type="text" name="auto_thumb_num" value="1" style="width: 200px;display: inline-block;"> 张图片作为缩略图
										</label>
									</p>
								</td>
							</tr>
							<tr>
								<td class="text-right">TAG：</td>
								<td colspan="5">
									<input type="text" class="input" name="tag" value="" style="width: 300px;display: inline-block;" placeholder="TAG" />请用逗号分隔
								</td>
							</tr>
							<tr>
								<td class="text-right">关键字：</td>
								<td colspan="5">
									<input type="text" class="input" name="keywords" value="" style="width: 300px;display: inline-block;" placeholder="请输入关键字" />
								</td>
							</tr>
							<tr>
								<td class="text-right">描述：</td>
								<td colspan="5">
									<textarea rows="5" class="input" placeholder="描述" name="description"></textarea>
								</td>
							</tr>
						</table>
					</div>
					<div class="x2" style="float: right;">
						<table class="table">
							<tr>
								<td>缩略图:</td>
							</tr>
							<tr>
								<td>
									<img id="thumbImg" class="hd-w140 hd-h110" src="__PUBLIC__/images/upload_pic.png" style="display: block;">
									<input  type="hidden"  value=""  name="thumb">
									<button class="button border-black" type="button" onclick="UploadThumb('thumb')">上传图片</button>
									<button class="button border-gray" type="button" onclick="removeThumb()">移除图片</button>
								</td>
							</tr>
							<tr>
								<td>转向链接:</td>
							</tr>
							<tr>
								<td><input type="text" class="input" name="redirecturl"/></td>
							</tr>
							<tr>
								<td>添加时间:</td>
							</tr>
							<tr>
								<td><input type="text" class="input" id="datetimepicker" name="addtime"/></td>
							</tr>
							<!--<tr>
								<td>阅读收费:</td>
							</tr>
							<tr>
								<td><input type="text" class="input"/></td>
							</tr>-->
							<tr>
								<td>排序:</td>
							</tr>
							<tr>
								<td><input type="text" class="input" value="100" name="arc_sort"/></td>
							</tr>
							<tr>
								<td>点击数:</td>
							</tr>
							<tr>
								<td><input type="text" class="input" value="100" name="click"/></td>
							</tr>
						</table>
					</div>
				</div>
			</div>
			<div class="panel-foot" style="text-align: center;">
				<button class="button bg-mix" type="submit">提交</button>
				<button class="button bg-dot" type="reset">取消</button>
			</div>
		</form>
	</div>

	<!--调色板-->
	<script src="__PUBLIC__/color/jquery.minicolors.js"></script>
	<link rel="stylesheet" href="__PUBLIC__/color/jquery.minicolors.css">
	
	<!--日历插件-->
	<link rel="stylesheet" type="text/css" href="__PUBLIC__/datetimepicker/jquery.datetimepicker.css"/ >
	<script src="__PUBLIC__/datetimepicker/jquery.datetimepicker.js"></script>

	
	<!--载入hd_modal-->
	<link rel="stylesheet" type="text/css" href="__PUBLIC__/hd/hdjs/hdjs.css"/>
	<script type="text/javascript" src="__PUBLIC__/hd/hdjs/hdjs.min.js"></script>
	<script src="__PUBLIC__/hd/js.js"></script>


	<!--百度编辑器-->
	<!-- 配置文件 -->
	<script type="text/javascript" src="__PUBLIC__/ueditor/ueditor.config.js"></script>
	<!-- 编辑器源码文件 -->
	<script type="text/javascript" src="__PUBLIC__/ueditor/ueditor.all.js"></script>
	<!-- 实例化编辑器 -->
	<script type="text/javascript">
		var ue = UE.getEditor('editor');
		var APP = "__APP__";
		var PUBLIC = "__PUBLIC__";
		$(function() {
			//调用日历插件
			$('#datetimepicker').datetimepicker({
				lang:"ch",           //语言选择中文
			    format:"Y-m-d H:i:s",      //格式化日期
			    timepicker:true,    //关闭时间选项
			    yearStart:2000,     //设置最小年份
			    yearEnd:2050,        //设置最大年份
			    todayButton:true    //关闭选择今天按钮
			});
			
			//调用调色板插件
			$('.color').each(function() {
				$(this).minicolors({
					control: $(this).attr('data-control') || 'hue',
					defaultValue: $(this).attr('data-defaultValue') || '',
					inline: $(this).attr('data-inline') === 'true',
					letterCase: $(this).attr('data-letterCase') || 'lowercase',
					opacity: $(this).attr('data-opacity'),
					position: $(this).attr('data-position') || 'bottom left',
					change: function(hex, opacity) {
						if (!hex) return;
						if (opacity) hex += ', ' + opacity;
						try {
							console.log(hex);
						} catch (e) {}
					},
					theme: 'bootstrap'
				});
			});
			
			//调用hdjs插件
			
			
			
		})
	</script>

</body>

</html>